package com.my.test.filter;

import java.util.ArrayList;
import java.util.List;

import com.my.test.aop.impl.GreetingImpl;
/**
 * before1
 * 		before2
 * 			invoke
 * 		after2
 * 		end2
 * after1
 * end1
 * @author Administrator
 *
 */
public class Client {

    public static void main(String[] args) {
        List<Proxy> proxyList = new ArrayList<Proxy>();
        proxyList.add(new Filter1());
        proxyList.add(new Filter2());

        ProxyFactory proxyFactory = new ProxyFactory(GreetingImpl.class, proxyList);
        GreetingImpl greetingProxy = proxyFactory.createProxy();

        greetingProxy.sayHello("Jack");
    }
}